/**
  ******************************************************************************
  * @文件名称 : data_public.c
  * @摘要 : 
  * @创建日期 : Jul 23, 2024
  * @创建者:citunhk
  ******************************************************************************
  * @使用说明
  *
  *  
  ******************************************************************************
  */

/* 声明包含头文件 -----------------------------------------------------------*/
#include "../Inc/data_public.h"
#include <string.h>
#include <stdlib.h>
/* 声明私有宏定义 -----------------------------------------------------------*/
#define ADMINPASSWORD "0075"
#define PCBPASSWORD "0033"
#define USERPASSWORD "0011"
/* 声明私有类型定义---------------------------------------------------------*/

/* 声明私有变量 -------------------------------------------------------------*/
/* 键盘对象定义 */
static lv_obj_t* alpha_cont;                           /* 键盘透明容器 */
static lv_obj_t* input_textarea;                       /* 键盘输入框 */
static lv_obj_t* back_cont;                            /* 键盘背景容器 */
static lv_obj_t* num_btn;                              /* 数字矩阵键盘 */
static lv_obj_t* charBtn;                              /* 字符矩阵键盘 */
static lv_obj_t* err_msg;							   /* 非法输入弹窗 */
static lv_obj_t* title_lable;						   /* 键盘标题标签 */
static lv_style_t alpha_style;						   /* 键盘透明容器风格 */
static int max_val, min_val;
static uint16_t *g_intResult;
static uint8_t program_lastStep = 255;
/* 按钮矩阵数组 */
static const char* num_map[] = { "1", "2", "3", LV_SYMBOL_BACKSPACE, "\n",
                                 "4", "5", "6", "CE", "\n",
                                 "7", "8", "9", LV_SYMBOL_CLOSE, "\n",
                                 "-", "0", ".", LV_SYMBOL_OK, "" };

uint16_t * infoGroup[INFO_GROUP_QTY];/* 信息组 */
listNode_t * listNode_extantInfo = NULL;/* 实时信息链表 */
listNode_t * listNode_historyInfo = NULL;/* 历史信息链表 */
uint8_t historyInfoNodeQty = 0;/* 历史信息链表节点数量 */

/* 密码输入框 */
lv_obj_t* loginPasswordTextarea;  //登录密码输入框
struct login loginInfo;   //登录信息
static lv_obj_t* loginConfBtn;  //登录确认按钮
static lv_obj_t* loginCancelBtn;  //登录取消按钮
static lv_obj_t* passwordErrorConfBtn;  //密码错误确认按钮
/* 声明私有常量 -------------------------------------------------------------*/

/* 声明私有函数 -------------------------------------------------------------*/

/* 界面构建相关变量（不保存） */
struct display disp = {DIF_NULL, DIF_NULL, DIF_NULL, DIF_NULL};  //显示界面状态
struct title titlebar;  //标题栏结构体

struct chartData curveData[CURVEDATASUM] __attribute__((section (".ext_sdram")));  //曲线显示数据
struct chartData g_packBuff[10*1024] __attribute__((section (".ext_sdram")));    //分包缓冲

uint8_t g_imgBuff[5][1000000] __attribute__((section (".ext_sdram")));     //图片数组
uint8_t g_icoBuff[16][1024*100]__attribute__((section (".ext_sdram")));     //icon1
uint8_t g_fontBuff[3000000]__attribute__((section (".ext_sdram")));        // 字库数组
/* dsc_ico_buff[0]曲线图标、dsc_ico_buff[1]菜单图标、dsc_ico_buff[2]菜单栏按钮选中图标、
 * dsc_ico_buff[3]菜单栏按钮释放图标、dsc_ico_buff[4]消息图标、dsc_ico_buff[5]消息选中按钮、
 * dsc_ico_buff[6]消息释放按钮、dsc_ico_buff[7]启动按钮、dsc_ico_buff[8]、停止按钮、
 * dsc_ico_buff[9]侧边栏按钮选中、dsc_ico_buff[10]侧边栏按钮释放、dsc_ico_buff[11]温度小图标、
 * dsc_ico_buff[12]温度大图标、dsc_ico_buff[13]压力图标、dsc_ico_buff[14]吉祥物图标、
 * dsc_ico_buff[15]岛津logo图标*/
lv_img_dsc_t dsc_ico_buff[16];    // 所有图标结构体
/*dsc_img_buff[0]开机图片、 dsc_img_buff[1]主页图片、 dsc_img_buff[2]纯色背景、
 *  dsc_img_buff[3]主页面内框、 dsc_img_buff[4]关于本机*/
lv_img_dsc_t dsc_img_buff[5];     // 存储图片信息结构体

int g_packRW;			   // 每次分包的指针偏移
int g_packCount;		   // 每次分包的记录数量
uint8_t g_overWritten;	   // 是否覆盖文件
uint8_t g_packReadOK;	   // 分包结束标志  0:未结束    1:结束
uint8_t g_mountNand_flag;  // 0:未挂载    1:挂载
uint8_t g_mountUSB_flag;   // 0:未挂载    1:挂载
uint8_t secondFlag;		   // 1秒倒计时
uint8_t g_loadFont;		   // 加载字体
uint8_t g_updateSystem;	   // 是否更新系统   0:不更新   1:更新

RW_State g_RW_State;
/* 界面显示相关数据 */
struct boardSysteam FP;  // __attribute__((section (".ext_sdram")));  //通讯参数库-控制主板工厂参数（不保存）
struct boardService UP;  // __attribute__((section (".ext_sdram")));  //通讯参数库-控制主板用户参数/运行状态（不保存）
struct dispAuxiliary DA;  //显示参数库-触摸屏辅助显示标志位（保存）
struct dispSysteam DS;  //显示参数库-触摸屏系统运行参数（保存）
struct setSysTime SST;  //显示参数库-触摸屏系统设置输入参数（不保存）
struct chartData CD;      //当前保存的曲线数据
struct commAuxiliary CA;  //通讯服务参数库-触摸屏辅助通讯标志位（不保存）
uint8_t loadingValue;  //加载进度值

struct dispLanguages dispText[2] = {
		/* 中文 */
		{.set = "设置", .menu = "菜单", .curve = "曲线", .run = "运行", .stop = "停止", .mess = "消息", .Return = " 返 回 ", .switchText = "切换显示参数",
	     .left = "左:", .right = "右:", .null = "空", .PV_F = "实测流量", .PV_P1 = "出液压力", .PV_T2 = "辅助温度",
		 .PV_T3 = "环境温度", .PV_WQ = "实测水质", .PV_P2 = "回液压力", .SV_F = "设置流量", .SV_P1 = "设置压力", .confirm = "确认", .cancel = "取消",
		 .runText = "#00AEFF 确认#" "#FFC000 运营#" "#00AEFF 设备 #", .stopText = "#00AEFF 确认#" "#FF0000 停止#" "#00AEFF 设备 #", .num = "序号:",
		 .time = "时间:", .temp = "温度", .Flow = "流量", .press = "压力", .dataExport = "数据导出？", .exporting = "导出中...", .exportSuccessful = "导出成功！", .exportFailed = "导出失败！",
		 .function = "功能设置", .display = "显示设置", .alarmSet = "报警设置", .commu = "通讯设置", .advanced = "高级设置", .about = "关于本机", .fac = "工厂参数",
		 .mode = "模式选择", .air = "气吹回液", .program = "程序控温", .startMode = "启动模式:", .flowMode = "控流模式:", .lock = "锁屏模式:",
		 .manual = "手动", .Auto = "自动", .flowCtrl = "流量控制", .pressCtrl = "压力控制", .off = "关", .on = "开",
		 .drainTime = "排液时长:",
		 .dryingTime = "吹干时长:",
		 .start = "启动", .determineText = "确定执行此操作", .staTemp = "稳定温度", .staTime = "稳定时间",
		 .loop = "程序循环使能", .language = "语言选择:", .tempUnit = "温度单位:", .tempPrec = "温度精度:", .flowUnit = "流量单位:", .pressUnit = "压力单位:",.setTime = "系统时间:",.setLight = "亮度调节:",
		 .ch = "中文", .en = "English", .tempAlarm = "温度报警", .flowAlarm = "流量报警", .pressureAlarm = "压力报警", .waterAlarm = "水质报警",
		 .maintenAlarm = "维护报警", .otherAlarm = "其它报警", .next = "下一项", .previous = "上一项", .modeTest = "检测模式:", .upper = "保护上限:",
		 .lowest = "保护下限:", .alarmUpper = "报警上限:", .alarmLower = "报警下限:", .running = "运行后", .power = "上电后",  .close = "关闭", .alarm = "报警",
		 .fault = "故障", .alarmLevel = "报警级别:", .lowestFlow = "流量下限:", .sensor = "传感器异常:", .PressUpper = "压力上限:", .PressLowest = "压力下限:",
		 .waterQuality = "水质实测:", .alarmValue = "报警值:", .ctrlRange = "控制范围:", .pump = "循环泵:", .comp = "压缩机:", .filter = "过滤器:",
		 .comp2 = "压缩机2:", .overFlowLevel = "泄漏报警级别:", .serial = "串行通讯", .parallel = "并行通讯", .commMode = "通讯模式:", .addr = "本机地址:",
		 .rate = "通讯速率:", .status = "通讯状态:", .port = "通讯端口:", .termType = "端子类型:", .local = "本地", .level = "电平", .edge = "边沿", .trigSigl = "触发信号:", .termDef = "端子定义:",
		 .DI12Option = "00-关闭 \n01-系统启停\n02-报警复位\n03-外部保护开关\n04-内外循环切换",.minalDef = "配置",.outConfig = LV_SYMBOL_WARNING"输出配置",
		 .DO12Option = "00-关闭 \n01-运行状态\n02-数字控制状态\n03-故障\n04-警告\n05-综合报警\n06-维护提示\n07-选择的报警\n08-选择的维护提示",
		 .sensCali = "传感器校准", .pidTuning = "PID整定", .autoCompens = "自动补偿", .reserve = "预留", .VLSet = "声光设置",
		 .mainTemp = "主温度校准:", .auxTemp = "辅助温度校准:", .ambTemp = "环境温度校准:", .criWater = "循环水质校准:", .flow = "流量校准:", .outletPress = "出液压力校准:",
		 .returnPress = "回液压力校准:", .tempTuning = "控温整定:", .flowTuning = "控流整定:", .compensMode = "补偿模式:", .compensTemp = "补偿温度:", .autoCompensText1 = "补偿温度自动计算时间系数:",
		 .autoCompensText2 = "补偿温度自动计算调节死区:", .manualInput = "手动输入", .autoCount = "自动计算", .brightness = "灯带亮度", .volume = "扬声器音量", .tempRange = "控温范围:",
		 .deviceModel = "设备型号:", .runtime = "运行时长:", .man = "生产厂家:  北京同洲维普科技有限公司", .version = "软件版本:  H216 + C19V%d + D06%d", .restore = "恢复出厂",

		 .factRnge = "保护范围:", .ctrlRnge = "控制范围:", .secondaryTemp = "辅温度传感器使能:", .ambientTemp = "环境温度传感器使能:", .heating = "加热模式:", .preheat = "预加热",
		 .thermal = "热控温", .ctrl = "控制模式:", .protTime = "压机保护时长:", .compHys = "压机启停回差:", .compStages = "压机控制级数:", .on_off = "启停式",
		 .single = "单机", .Double = "双机", .sysTime = "系统时间:", .setSystemTime = "设置时间",.tempAlarm_H = "高温报警", .tempAlarm_L = "低温报警", .pressAlarm_H = "高压报警",
		 .pressAlarm_L = "低压报警", .flowAlarm_L = "低流量报警", .pumpRemain = "水泵维护", .filterRemian = "过滤器维护", .compressRemain = "压缩机维护", .dustRemain = "防尘维护", .fanRemain = "风机维护",
		 .AlarmLevel = "报警级别:", .flowDown = "流量下限:", .sensorErr = "传感器异常:", .alarmUp = "报警上限:",
		 .alarmDown = "报警下限:", .waterMeasure = "水质实测:" ,
		 .AlarmValue = "报警值:", .ctrlTemp = "控制范围:", .cyclcPump = "循环泵:",
		 .compress = "压缩机:",.Filter = "过滤器:", .compress2 = "压缩机2:",.outAlarmLevel = "泄露报警级别:",
		 .reset = "复位",
		 .single = "单机", .Double = "双机", .ctrlMode = "控制模式:", .ref = "制冷阀:", .byp = "旁通阀:", .highp = "冷凝压力:",
		 .satt = "饱和温度:", .condt = "冷凝温度:", .sct = "过冷度:", .lowp = "蒸发压力:", .evat = "蒸发温度:", .sht = "过热度:",
		 .outt = "压机出气温度:", .sv = "设置温度:", .auxEnable = "辅助阀使能:", .aux = "辅助阀:", .lowt2 = "下限温度2:", .lowt1 = "下限温度1:", .hight1 = "上限温度1:",
		 .hight2 = "上限温度2:", .send = "发送", .none = "无", .with = "有", .lowEvaSetMode = "蒸发压力下限设置模式:", .lowEva = "蒸发压力下限:", .evaConfirmTime = "蒸发压力确认时间:",
		 .evaT = "蒸发温度报警范围:", .compTempHigh = "压机出气温度上限:", .condPressHigh = "冷凝压力上限值:", .condConfirmTime = "冷凝压力确认时间:", .refNormLowPress = "氟压平衡低压报警值:", .highPressSw = "高压开关:",
		 .highPressSe = "高压传感器:", .condTempSe = "冷凝温度:", .outletTempSe = "出气温度:", .evaTempSe = "蒸发温度:", .not = "不检测", .detect = "检测",
		 .flowSe = "传感器:", .flowCt = "执行器:", .flowRnge = "测流范围:", .ctrlFlowRnge = "控流范围:", .pluseFactor = "脉冲系数:", .maxFrequency = "最大操作频率:",
		 .minFrequency = "最小操作频率:", .targetValue = "变频器目标值:", .analog = "模拟信号", .pluse = "脉冲信号", .comm = "通讯信号",

		 .outlet = "出液压力:", .liquid = "回液压力:", .pressRnge = "测压范围:", .pressCt = "执行器:", .ctrlPressRnge = "控制范围:",
		 .factInput1 = "工厂输入1:", .factInput2 = "工厂输入2:", .factInput3 = "工厂输入3:", .factInput4 = "工厂输入4:", .water = "水质检测:", .cooling = "冷却水检测:",
		 .lowFType = "低流量选择:", .factDropdownInput1 = "00-关闭\n01-氟路高压开关\n02-泄漏液位开关\n03-压机1氟压开关\n04-低液位开关上",
		 .factDropdownInput2 = "00-关闭\n01-氟路低压开关\n02-急停开关\n03-压机2氟压开关\n04-泄漏液位开关",
		 .factDropdownInput3 = "00-关闭\n01-出液流量开关\n02-高液位开关",
		 .factDropdownInput4 = "00-关闭\n01-泄漏液位开关",
		 .lowFTypeDropdown = "00-关闭\n01-内循环检测\n02-低流量检测",
		 .factOut1 = "工厂输出1:", .factOut2 = "工厂输出2:", .HTAV = "高温阀:", .LTAV = "低温阀:", .tOff = "℃ 关", .tOn = "℃ 开",
		 .factDropdownOut1 = "00-关闭\n01-高温辅助阀\n02-低温辅助阀\n03-内外循环阀\n04-气吹回液阀\n05-水质电磁阀\n06-运行状态\n07-报警提示器",
		 .factDropdownOut2 = "00-关闭\n01-高温辅助阀\n02-低温辅助阀\n03-内外循环阀\n04-气吹回液阀\n05-水质电磁阀\n06-报警提示器",
		 .Detect = "检测延时:", .comf = "确认延时:", .Temp = "温度:", .flow_Prs = "流量/压力:", .highTemp = "保护温度上限:", .lowTemp = "保护温度下限:",
		 .lowFlow = "保护流量下限:", .lowLevel = "水箱液位下限:", .light = "声光功能:", .ledSum = "灯珠数量:", .sound = "扬声器:", .device = "设备型号:",
		 .manuInfo = "厂家信息:", .refType = "冷媒种类:", .commProtocol = "通讯协议:", .no = "不显示", .yes = "显示", .saveUser = "    保存\n用户参数",
		 .saveFac = "    保存\n工厂参数", .restFac = "    恢复\n工厂参数", .TEmp = "温度相关", .Ref = "氟路相关", .eev = "电子膨胀阀", .refAlarm = "氟路报警",
		 .FLow = "流量相关", .Press = "压力相关",  .check = "检测配置", .por = "端口配置", .Alarm = "报警配置", .Light = "声光配置",
		 .info = "设备信息", .infoTttle_ID = "ID", .infoTttle_extantText = "实时信息内容", .infoTttle_historyText = "历史信息内容", .infoTttle_ariseTime = "触发时间",
		 .infoTttle_duration = "持续时长", .infoTttle_type = "类型", .soundOn = "开蜂鸣器", .soundOff = "关蜂鸣器",
		 .extantInfo = "查看历史", .historyInfo = "查看实时", .resetInfo = "复位信息", .moreInfo = "更多",
		 .loginText = "此界面需要登录后才能进行操作，\n如需登录请在下方输入登录密码。",
		 .code = "密码:", .password = "请输入密码......", .passwordErrorText = "密码错误，请重新输入密码。",
		 .ok = "确定", .abolish = "取消", .timeConfig = "时间设置", .timeCont = "是否修改当前时间",.inputErr = LV_SYMBOL_WARNING"错误",
		 .errPrompt = "无效的输入，请重新输入！！！",.systemSet = "屏幕设置", .ctrlTempID = "序号", .stableTemp = "稳定温度",
		 .stableTime = "稳定时间", .programLoop = "程序循环使能", .DialogTitle = "确认对话框", .DialogCont = "确定执行此操作？",
		 .autoLock = "自动息屏:", .lockTimeOption = " 30秒\n 1分钟\n 5分钟\n 10分钟\n 30分钟\n"
		},

		/* 英文 */
		{.set = "Set", .menu = "Menu", .curve = "Curve", .run = "Run", .stop = "Stop", .mess = "Info",.Return = "Return", .switchText = "Switch display parameters",
		 .left = "Left:", .right = "Right:", .null = "Null", .PV_F = "PV_F", .PV_P1 = "PV_P1", .PV_T2 = "PV_T2",
		 .PV_T3 = "PV_T3", .PV_WQ = "PV_WQ", .PV_P2 = "PV_P2", .SV_F = "SV_F", .SV_P1 = "SV_P1", .confirm = "Confirm", .cancel = "Cancel",
		 .runText = "#00AEFF Confirm#" "#FFC000 run#" "#00AEFF device #", .stopText = "#00AEFF Confirm#" "#FF0000 stop#" "#00AEFF device ", .num = "num:",
		 .time = "Time:", .temp = "Temp", .Flow = "Flow", .press = "Press", .dataExport = "Data Export?", .exporting = "Exporting...", .exportSuccessful = "Export Successful!", .exportFailed = "Export Failed!",
		 .function = "Function", .display = "Display", .alarmSet = "Alarm", .commu = "Commu", .advanced = "Advanced", .about = "About", .fac = "Fac",
		 .mode = "Mode", .air = "Air", .program = "Program", .startMode = "Start mode:", .flowMode = "Flow ctrl:", .lock = "Lock screen:",
		 .manual = "Manual", .Auto = "Auto", .flowCtrl = "Flow", .pressCtrl = "Pressure", .off = "Off", .on = "On",
		 .drainTime = "Drain time:",.dryingTime = "Drying time:", .start = "Start", .determineText = "Determined to do this", .staTemp = "StaTemp", .staTime = "StaTime",
		 .loop = "Loop", .language = "Language:", .tempUnit = "Temp scale:", .tempPrec = "Temp:", .flowUnit = "Flow unit:", .pressUnit = "Pressure:",.setTime = "SetTime:",.setLight = "Light:",
		 .ch = "中文", .en = "English", .tempAlarm = "Temp", .flowAlarm = "Flow", .pressureAlarm = "Pressure", .waterAlarm = "Water",
		 .maintenAlarm = "Mainten", .otherAlarm = "Other", .next = "Next", .previous = "Last", .modeTest = "Mode:", .upper = "Upper:",
		 .lowest = "Lowest:", .alarmUpper = "AlarmUpper:", .alarmLower = "AlarmLower:", .running = "Run", .power = "Power",  .close = "Off", .alarm = "Alarm",
		 .fault = "Fault", .alarmLevel = "Level:", .lowestFlow = "Lowest Flow:", .sensor = "Sensor:", .PressUpper = "Upper:", .PressLowest = "Lowest:",
		 .waterQuality = "Water:", .alarmValue = "Alarm:", .ctrlRange = "Ctrl:", .pump = "Pump:", .comp = "Comp:", .filter = "Filter:",
		 .comp2 = "Comp2:", .overFlowLevel = "Over Flow Level:", .serial = "Serial", .parallel = "Parallel", .commMode = "Mode:", .addr = "Address:",
		 .rate = "Rate:", .status = "Status:", .port = "Port:", .termType = "Terminal:", .local = "Local", .level = "Level", .edge = "Edge", .trigSigl = "Trigger:", .termDef = "Minal define:",
		 .DI12Option = "00-Close\n01-Sys ctrl\n02-Alarm reset\n03-Ext pro sw\n04-Circulate sw",.minalDef = "config",.outConfig = LV_SYMBOL_WARNING"Output Config",
		 .DO12Option = "00-Close\n01-Run state\n02-Ctrl state\n03-Fault\n04-Alarm\n05-All alarm\n06-Main prompt\n07-Select alarm\n08-Select main",
		 .sensCali = "Sens Cali", .pidTuning = "PID Tun", .autoCompens = "Auto\nCompe", .reserve = "Reserve", .VLSet = "Light",
		 .mainTemp = "Main Temp:", .auxTemp = "Aux Temp:", .ambTemp = "Amb Temp:", .criWater = "Cri Water:", .flow = "Flow:", .outletPress = "Out Press:",
		 .returnPress = "Ret Press:", .tempTuning = "Temp:", .flowTuning = "Flow:", .compensMode = "Mode:", .compensTemp = "Temp:", .autoCompensText1 = "Temp time coefficient:",
		 .autoCompensText2 = "Temp dead zone:", .manualInput = "Manual", .autoCount = "Auto", .brightness = "Brightness", .volume = "Volume", .tempRange = "Ctrl:",
		 .deviceModel = "Device model:", .runtime = "Run time:", .man = "Man:", .version = "Version: H216 + C19V%d + D06%d", .restore = "Restore",

		 .factRnge = "Fact Rnge:", .ctrlRnge = "Ctrl Rnge:", .secondaryTemp = "Secondary Temp:", .ambientTemp = "Ambient Temp:", .heating = "Heating:", .preheat = "Preheat",
		 .thermal = "Thermal", .ctrl = "Ctrl:", .protTime = "Prot Time:", .compHys = "Comp Hys:", .compStages = "Comp Stages:", .on_off = "On/Off",
		 .single = "Single", .Double = "Double",.sysTime = "Sys time:", .setSystemTime = "Set Time", .tempAlarm_H = "High Temp Alarm", .tempAlarm_L = "Low Temp Alarm", .pressAlarm_H = "High Press Alarm",
		 .pressAlarm_L = "Low Press Alarm", .flowAlarm_L = "Low Flow Alarm", .pumpRemain = "Pump", .filterRemian = "Filter", .compressRemain = "Comp", .dustRemain = "Dust", .fanRemain = "Fan",
		 .AlarmLevel = "Level:", .flowDown = "Lowest flow: ", .sensorErr = "Sensor:", .alarmUp = "Upper: ",
		 .alarmDown = "Lowest:", .waterMeasure = "Water quality:" ,
		 .AlarmValue = "Alarm:",.ctrlTemp = "Ctrl:",.cyclcPump = "Pump:",
		 .compress = "Comp:", .Filter = "Filter:", .compress2 = "Comp2:",.outAlarmLevel = "Overflow level:",
		 .reset = "Reset",
		 .single = "Single", .Double = "Double", .ctrlMode = "Ctrl Mode:", .ref = "Ref:", .byp = "Byp:", .highp = "HighP:",
		 .satt = "SatT:", .condt = "CondT:", .sct = "Sct:", .lowp = "LowP:", .evat = "EvaT:", .sht = "ShT:",
		 .outt = "OutT:", .sv = "SV:", .auxEnable = "Aux Enable:", .aux = "Aux:", .lowt2 = "LowT2:", .lowt1 = "LowT1:", .hight1 = "HighT1:",
		 .hight2 = "HighT2:", .send = "Send", .none = "None", .with = "With", .lowEvaSetMode = "Low Eva Set Mode:", .lowEva = "Low Eva:", .evaConfirmTime = "Eva Confirm Time:",
		 .evaT = "EvaTemp Alarm Rnge:", .compTempHigh = "Comp Temp High:", .condPressHigh = "Cond Press High:", .condConfirmTime = "Cond Confirm Time:", .refNormLowPress = "Ref Norm Low Press:", .highPressSw = "High Press Sw:",
		 .highPressSe = "High Press Se:", .condTempSe = "Cond Temp Se:", .outletTempSe = "Outlet Temp Se:", .evaTempSe = "Eva Temp Se:", .not = "not", .detect = "detect",
		 .flowSe = "Flow Se:", .flowCt = "Flow Ct:", .flowRnge = "Svy Rnge:", .ctrlFlowRnge = "Ctrl Rnge:", .pluseFactor = "Pluse Factor:", .maxFrequency = "Max Frequency:",
		 .minFrequency = "Min Frequency:", .targetValue = "Target Value:", .analog = "Analog", .pluse = "Pluse", .comm = "Comm",
		 .outlet = "Outlet:", .liquid = "Liquid:", .pressRnge = "Svy Rnge:", .pressCt = "Press Ct:", .ctrlPressRnge = "Ctrl Rnge:",
		 .factInput1 = "Fact Input1:", .factInput2 = "Fact Input2:", .factInput3 = "Fact Input3:", .factInput4 = "Fact Input4:", .water = "Water:", .cooling = "Cooling:",
		 .lowFType = "LowF Type:", .factDropdownInput1 = "00-Close\n01-Flu high sw\n02-Overflow sw\n03-Comp1 flu sw\n04-Low level(Up)",
		 .factDropdownInput2 = "00-Close\n01-Flu low sw\n02-Stop\n03-Comp2 flu sw\n04-Overflow sw",
		 .factDropdownInput3 = "00-Close\n01-Outflow sw\n02-High level",
		 .factDropdownInput4 = "00-Close\n01-Leak sw",
		 .lowFTypeDropdown = "00-Close\n01-Indetection\n02-Low flow",
		 .factOut1 = "Fact Out1:", .factOut2 = "Fact Out2:", .HTAV = "HTAV:", .LTAV = "LTAV:", .tOff = "℃ Off", .tOn = "℃ On",
		 .factDropdownOut1 = "00-Close\n01-High valve\n02-Low valve\n03-Circulate valve\n04-Air valve\n05-WQ valve\n06-Run State\n07-Alarm Reminder Device",
		 .factDropdownOut2 = "00-Close\n01-High valve\n02-Low valve\n03-Circulate valve\n04-Air valve\n05-WQ valve\n06-Alarm Reminder Device",
		 .Detect = "Detect:", .comf = "Comf:", .Temp = "Temp:", .flow_Prs = "Flow/Prs:", .highTemp = "High Temp:", .lowTemp = "Low Temp:",
		 .lowFlow = "Low Flow:", .lowLevel = "Low Level:", .light = "Light:", .ledSum = "Led Sum:", .sound = "Sound:", .device = "Device:",
		 .manuInfo = "Manu Info:", .refType = "Ref Type:", .commProtocol = "Comm Protocol:", .no = "No", .yes = "Yes", .saveUser = "Save User",
		 .saveFac = "Save Fac", .restFac = "Rest Fac", .TEmp = "Temp", .Ref = "Ref", .eev = "EEV", .refAlarm = "Ref Alarm",
		 .FLow = "Flow", .Press = "Press",  .check = "Check", .por = "Por", .Alarm = "Alarm", .Light = "Light",
		 .info = "Info", .infoTttle_ID = "ID", .infoTttle_extantText = "extant info text", .infoTttle_historyText = "history info text", .infoTttle_ariseTime = "T-arise",
		 .infoTttle_duration = "duration", .infoTttle_type = "type", .soundOn = "sound on", .soundOff = "sound off",
		 .extantInfo = "check history", .historyInfo = "check extant", .resetInfo = "reset info", .moreInfo = "more info",
		 .loginText = "\nPlease enter your login password below.",
		 .code = "Code:", .password = "Please input a password...", .passwordErrorText = "Password error,please\nre-enter the password.",
		 .ok = "OK", .abolish = "Cancel", .timeConfig = "Time Setting", .timeCont = "Is the current time changed?",.inputErr = LV_SYMBOL_WARNING"Error",
		 .errPrompt = "Invalid input, please re-enter!!!",.systemSet = "Screen", .ctrlTempID = "ID", .stableTemp = "Stable Temp", .stableTime = "Stable Time",
		 .programLoop = "Program Loop Enable",.DialogTitle = "Confirm dialog box", .DialogCont = "Confirm to perform this operation?",
		 .autoLock = "Auto Lock:",.lockTimeOption = " 30s\n 1min\n 5min\n 10min\n 30分钟min\n"
		}
};

/* 显示界面构建共用（不保存） */
lv_obj_t* parentObj_img = NULL;  //父对象
lv_obj_t* parentObj = NULL;  //父对象
lv_obj_t* parentObj1;  //父对象1
lv_obj_t* parentObj2;  //父对象2
lv_obj_t* parentObj3;  //父对象3
lv_obj_t* loginObj = NULL;  //登录界面父对象
lv_obj_t* passwordErrorObj = NULL;  //密码错误界面父对象
lv_obj_t* list;  //列表
lv_obj_t* cont;  //容器
lv_timer_t* UI_display_timer;  //界面显示定时器
lv_timer_t* UI_display_titlebar_timer;  // 标题栏显示定时器
lv_style_t style_parentObj; //定义窗口对象样式
lv_style_t style_parentObj1; //定义弹窗对象样式
lv_style_t style_btn1; //定义按钮样式1  菜单、曲线、运行
lv_style_t style_btn2; //定义按钮样式2  报警消息
lv_style_t style_btn3; //定义按钮样式1  菜单、曲线、运行
lv_style_t style_btn4; //定义按钮样式2  报警消息
lv_style_t style_btn5; //定义选项卡侧边栏按钮样式
lv_style_t style_btn6; //定义保存按钮样式
lv_style_t style_btn7; //定义曲线切换按钮样式
lv_style_t style_label1; //定义标签样式1  报警消息数量
lv_style_t style_label2; //定义标签样式2  左下选择窗口选项选中标签
lv_style_t style_label3; //定义标签样式3  左下选择窗口选项未选中标签
lv_style_t style_label4; //定义标签样式  菜单窗口切换标签  功能设置、显示设置...
lv_style_t style_list1; //定义列表样式1
lv_style_t style_cont1; //定义容器样式1
/* 显示界面脚本共用（不保存） */
//uint8_t progressDelay;  //进度延时
/* 通讯辅助参数（不保存）*/
uintptr_t userAdde;
//uintptr_t upStart;
//uintptr_t upEnd;
//uintptr_t fpStart;
//uintptr_t fpEnd;
uintptr_t upStart = (uintptr_t)&UP;
uintptr_t upEnd = (uintptr_t)&UP + sizeof(UP) - 1;
uintptr_t fpStart = (uintptr_t)&FP;
uintptr_t fpEnd = (uintptr_t)&FP + sizeof(FP) - 1;
/* 共用样式、创建函数 */
/**
  * @brief  对象样式初始化
  * @param  无
  * @retval 无
  */
void init_displsy_style(void)
{
    /* 样式1 */
    lv_style_init(&style_parentObj);  //初始化样式
    /* 无填充 */
    lv_style_set_pad_top(&style_parentObj, 0);
    lv_style_set_pad_bottom(&style_parentObj, 0);
    lv_style_set_pad_left(&style_parentObj, 0);
    lv_style_set_pad_right(&style_parentObj, 0);
    lv_style_set_bg_opa(&style_parentObj, LV_OPA_0);  //设置背景透明度
    lv_style_set_shadow_opa(&style_parentObj, LV_OPA_0);  //设置阴影透明度
    lv_style_set_border_width(&style_parentObj,0);  //无边框
    lv_style_set_radius(&style_parentObj, 0);  //设置边框半径

    /* 样式2 */
    lv_style_init(&style_parentObj1);  //初始化样式
    /* 无填充 */
    lv_style_set_pad_top(&style_parentObj1, 0);
    lv_style_set_pad_bottom(&style_parentObj1, 0);
    lv_style_set_pad_left(&style_parentObj1, 0);
    lv_style_set_pad_right(&style_parentObj1, 0);
    lv_style_set_border_color(&style_parentObj1,lv_color_hex(COLOUR_WIIP_GREY));
    lv_style_set_radius(&style_parentObj1, 5);  //设置边框半径
}

/**
  * @brief  按钮样式初始化
  * @param  无
  * @retval 无
  */
void init_btn_style1(void)
{
    /* 样式1 菜单、曲线、运行*/
    lv_style_init(&style_btn1);  //初始化样式
    lv_style_set_bg_color(&style_btn1, lv_color_hex(0xe9e9ea));  //设置背景
//    lv_style_set_bg_opa(&style_btn1, LV_OPA_0);  //设置背景透明度
    lv_style_set_shadow_opa(&style_btn1, LV_OPA_0);  //设置阴影透明度
    lv_style_set_width(&style_btn1, 228);  //宽
    lv_style_set_height(&style_btn1, 98);  //高
    /* 样式2 报警消息*/
    lv_style_init(&style_btn2);  //初始化样式
    lv_style_set_bg_opa(&style_btn2, LV_OPA_0);  //设置背景透明度
    lv_style_set_shadow_opa(&style_btn2, LV_OPA_0);  //设置阴影透明度
    lv_style_set_width(&style_btn2, 120);  //宽
    lv_style_set_height(&style_btn2, 47);  //高

    /* 样式3 左下选择窗口选项选中按钮*/
    lv_style_init(&style_btn3);  //初始化样式
    lv_style_set_bg_color(&style_btn3, lv_color_hex(0x3a96f1));  //背景绿色
    lv_style_set_bg_opa(&style_btn3, 255);  //透明度
    lv_style_set_radius(&style_btn3, 23);  //设置边框半径
    lv_style_set_border_width(&style_btn3, 0);  //设置边框的宽度
    lv_style_set_width(&style_btn3, 134);  //宽
    lv_style_set_height(&style_btn3, 53);  //高

    /* 样式4 左下选择窗口选项未选中按钮*/
    lv_style_init(&style_btn4);  //初始化样式
    lv_style_set_bg_color(&style_btn4, lv_color_hex(0xbebdc0));  //背景灰色
    lv_style_set_bg_opa(&style_btn4, 255);  //透明度
    lv_style_set_radius(&style_btn4, 23);  //设置边框半径
    lv_style_set_border_width(&style_btn4, 0);  //设置边框的宽度
    lv_style_set_width(&style_btn4, 134);  //宽
    lv_style_set_height(&style_btn4, 53);  //高

    /* 样式5 侧边栏选项卡按钮未选中 */
	lv_style_init(&style_btn5);										// 初始化选项卡按钮风格
    lv_style_set_width(&style_btn5, lv_pct(100));  //宽
    lv_style_set_height(&style_btn5, lv_pct(26));  //高

    /* 样式6 侧边栏选项卡按钮未选中 */
	lv_style_init(&style_btn6);										// 初始化选项卡按钮风格
    lv_style_set_width(&style_btn6, lv_pct(30));  //宽
    lv_style_set_height(&style_btn6, lv_pct(26));  //高

    /* 样式7 曲线切换按钮样式 */
    lv_style_init(&style_btn7);  //初始化样式
    lv_style_set_bg_color(&style_btn7, lv_color_hex(0x808080));  //背景灰色
    lv_style_set_bg_opa(&style_btn7, 255);  //透明度
    lv_style_set_radius(&style_btn7, 5);  //设置边框半径
    lv_style_set_border_width(&style_btn7, 0);  //设置边框的宽度
    lv_style_set_width(&style_btn7, 110);  //宽
    lv_style_set_height(&style_btn7, 53);  //高
}

/**
  * @brief  标签样式初始化
  * @param  无
  * @retval 无
  */
void init_label_style1(void)
{
    /* 样式1 报警消息数量*/
    lv_style_init(&style_label1);  //初始化样式
    lv_style_set_bg_color(&style_label1, lv_color_hex(0xff0000));  //背景红色
    lv_style_set_bg_opa(&style_label1, 255);
    lv_style_set_text_color(&style_label1, lv_color_hex(0xffffff));  //字体白色
    lv_style_set_radius(&style_label1, 13);  //设置边框半径
    lv_style_set_border_width(&style_label1, 0);  //设置边框的宽度
    lv_style_set_text_font(&style_label1, &lv_font_montserrat_20);  //字体
    lv_style_set_width(&style_label1, 26);  //宽
    lv_style_set_height(&style_label1, 26);  //高

    /* 样式2 切换显示选择窗口选项标签*/
    lv_style_init(&style_label2);  //初始化样式
    lv_style_set_bg_opa(&style_label2, 0);
    lv_style_set_text_color(&style_label2, lv_color_hex(0xffffff));  //字体白色

    /* 样式3 左下选择窗口选项未选中标签  未使用*/
    lv_style_init(&style_label3);  //初始化样式
    lv_style_set_bg_color(&style_label3, lv_color_hex(0x808080));  //背景灰色
    lv_style_set_bg_opa(&style_label3, 255);
    lv_style_set_text_color(&style_label3, lv_color_hex(0xffffff));  //字体白色
    lv_style_set_radius(&style_label3, 23);  //设置边框半径
    lv_style_set_border_width(&style_label3, 0);  //设置边框的宽度
    lv_style_set_width(&style_label3, 134);  //宽
    lv_style_set_height(&style_label3, 53);  //高

    /* 样式4 菜单窗口切换标签  功能设置、显示设置...*/
    lv_style_init(&style_label4);  //初始化样式
    lv_style_set_text_color(&style_label4, lv_color_hex(0xffffff));  //字体白色
    lv_style_set_bg_opa(&style_label4, LV_OPA_100);
    lv_style_set_width(&style_label4, 251);  //宽
    lv_style_set_height(&style_label4, 74);  //高
}

/**
  * @brief  列表样式初始化
  * @param  无
  * @retval 无
  */
void init_list_style1(void)
{
    /* 样式1 报警消息数量*/
    lv_style_init(&style_list1);  //初始化样式
    lv_style_set_pad_bottom(&style_list1, 0);
    lv_style_set_pad_left(&style_list1, 0);
    lv_style_set_pad_right(&style_list1, 0);
    lv_style_set_bg_opa(&style_list1, LV_OPA_0);  //设置背景透明度
    lv_style_set_shadow_opa(&style_list1, LV_OPA_0);  //设置阴影透明度
    lv_style_set_border_opa(&style_list1, LV_OPA_0);  //设置边框透明度
}

/**
  * @brief  容器样式初始化
  * @param  无
  * @retval 无
  */
void init_cont_style1(void)
{
    /* 样式1 报警消息数量*/
    lv_style_init(&style_cont1);  //初始化样式
    lv_style_set_bg_opa(&style_cont1, LV_OPA_0);  //设置背景透明度
    lv_style_set_shadow_opa(&style_cont1, LV_OPA_0);  //设置阴影透明度
    lv_style_set_border_opa(&style_cont1, LV_OPA_0);  //设置边框透明度
}

/**
 * @brief  点击弹出键盘回调函数
 * @param  *e :事件相关参数的集合，它包含了该事件的所有数据
 * @return 无
 */
static void cont_event_cb(lv_event_t* e)
{
    lv_event_code_t code = lv_event_get_code(e);                                /* 获取事件类型 */
    lv_obj_t* target = lv_event_get_target(e);                                  /* 获取触发源 */

    if (target == alpha_cont)
    {
       if (code == LV_EVENT_CLICKED)
       {
          lv_obj_del(alpha_cont);
       }
    }

}
/**
  * @brief	键盘回调函数
  * @param  e 触发的事件
  * @retval None
  */
static void btnm_event_cb(lv_event_t* e)
{
    uint8_t id, count = 0, i = 0;
    int now_val;
    char* endptr;
    const char* txt;
    float temp;
    lv_event_code_t code = lv_event_get_code(e);                      /* 获取事件类型 */
    lv_obj_t* target = lv_event_get_target(e);                        /* 获取触发源 */
    kb_userData_t * user_data = (kb_userData_t*)lv_event_get_user_data(e);
    if (target == num_btn)
    {
        if (code == LV_EVENT_CLICKED)
        {
            id = lv_btnmatrix_get_selected_btn(target);              /* 获取按键索引 */
            switch (id)
            {
            case 3:
                lv_textarea_del_char(input_textarea);                /* 删除输入框一个字符 */
                break;
            case 7:
                lv_textarea_set_text(input_textarea, "");            /* 清空输入框 */
                break;
            case 11:
            	lv_obj_del(alpha_cont);								 /* 退出键盘 */
                break;
            case 12:											     /* 负号 */
                txt = lv_textarea_get_text(input_textarea);
                if (strcmp(txt, "") == 0)
                {
                    lv_textarea_add_text(input_textarea, \
                    		lv_btnmatrix_get_btn_text(target, id));
                }
                break;
            case 14:												/* 小数点 */
            	if(lv_btnmatrix_has_btn_ctrl(num_btn, 14, LV_BTNMATRIX_CTRL_DISABLED))
            	{
            		break;
            	}
            	else
            	{
                    txt = lv_textarea_get_text(input_textarea);
                    for (uint8_t i = 0; txt[i] != '\0'; i++)
                    {
                        if (txt[i] == '.') {
                            count++;
                        }
                    }
                    if (count == 0 && txt[i - 1] != '-' && txt[0] != '\0')
                    {
                        lv_textarea_add_text(input_textarea, \
                        		lv_btnmatrix_get_btn_text(target, id));
                    }
                    break;
            	}

            case 15:											  /* 确认按键 */
            	txt = lv_textarea_get_text(input_textarea);
            	now_val = atoi(txt);
            	if (now_val >= min_val && now_val <= max_val)
            	{
            		temp = strtof(txt, &endptr);
            		if(user_data == NULL)
//            			*user_data = temp;/* 若user_data为非4字节对齐时，会导致访问错误 */
            			*g_intResult = (uint16_t)now_val;
            		else
            			memcpy(user_data->value, &temp, 4);
            		    lv_obj_del(alpha_cont);
            	}
            	else
            	{
            		err_msg = lv_msgbox_create(num_btn, dispText[DA.typeLanguage].inputErr,\
            				dispText[DA.typeLanguage].errPrompt, NULL, true);
            		lv_obj_set_style_text_font(err_msg,&daojin22,LV_STATE_DEFAULT);
            		lv_obj_set_size(err_msg, lv_pct(100), lv_pct(100));
            		lv_obj_align(err_msg, LV_ALIGN_TOP_MID, 0, 0);
            		lv_obj_t *tit = lv_msgbox_get_title(err_msg);       // 获取消息框的标题部分
            		lv_obj_set_style_text_color(tit,  lv_color_hex(0xff0000), LV_STATE_DEFAULT);
            	}
            	if (user_data->store_enable == 1)
            	{
                	/* 通讯辅助 */
            		upStart = (uintptr_t)&UP;
            		upEnd = (uintptr_t)&UP + sizeof(UP) - 1;
            		fpStart = (uintptr_t)&FP;
            		fpEnd = (uintptr_t)&FP + sizeof(FP) - 1;
                	CA.flagWrite = 1;
                	if(CA.sumReg == 1)
                	{
                		userAdde = (uintptr_t)g_intResult;
                		CA.ramAddr = g_intResult;
                	}
                	else if(CA.sumReg == 2)
                	{
                		userAdde = (uintptr_t)user_data->value;
                		CA.ramAddr = user_data->value;
                	}
            		if((userAdde >= upStart) && (userAdde <= upEnd))  //用户参数
            		{
            			CA.commAddr = ((userAdde - upStart) / 2) + 99;
            		}
            		else if((userAdde >= fpStart) && (userAdde <= fpEnd))  //工厂参数
            		{
            			CA.commAddr = ((userAdde - fpStart) / 2) + 999;
            		}
            	}
                break;
            default:											    /* 0-9 */
            	if (id <=15)
            	{
                	lv_textarea_add_text(input_textarea, \
                			lv_btnmatrix_get_btn_text(target, id)); /* 更新输入框标签文本 */
            	}
            	break;
            }
        }
    }
    else if (target == charBtn)// 字符键盘
    {
    	if (code == LV_EVENT_CLICKED)
    	{
    		id = lv_btnmatrix_get_selected_btn(target);					// 获取键盘索引
    		if (id == 39)												// 确定按钮
    		{
        		strcpy(user_data->value, lv_textarea_get_text(input_textarea));
        		if(lv_obj_is_valid(loginPasswordTextarea) == true)  //登录密码输入框存在
        		{
        			lv_textarea_set_text(loginPasswordTextarea, &loginInfo.loginPassword[0]);  //将变量数值给密码输入输入框
        		}
        		lv_obj_del(alpha_cont);
    		}
    	}
    }
}
/**
  * @brief	创建字符键盘
  * @param  result 用户传入的参数
  * @retval None
  */
void keyboard_create_char(kb_userData_t* result)
{
    /* 创建全屏透明容器 */
	alpha_cont = lv_obj_create(lv_scr_act());                                   /* 基于屏幕创建了一个容器 */
    lv_obj_add_style(alpha_cont, &style_parentObj, LV_STATE_DEFAULT);			/* 无边框 */
    lv_obj_set_size(alpha_cont, lv_pct(100), lv_pct(87));  						/* 设置父对象的大小 */
    lv_obj_set_style_bg_color(alpha_cont,lv_palette_main(LV_PALETTE_GREEN), \
    		LV_STATE_DEFAULT);													 /* 设置背景颜色 */
    lv_obj_align(alpha_cont, LV_ALIGN_BOTTOM_LEFT, 0, 0); 						 /*设置父对象的位置 */
                                                             /* 对象居屏幕中间显示 */
    /* 定义透明容器风格 */
    lv_style_init(&alpha_style);                                                 /* 初始化样式 */
    lv_style_set_radius(&alpha_style, 0);                                        /* 设置样式的圆角弧度*/
    lv_style_set_border_width(&alpha_style, 0);                                  /* 设置边框宽度 */
    lv_style_set_bg_opa(&alpha_style, LV_OPA_TRANSP);                            /* 设置样式背景的透明度，透明 */
    lv_style_set_pad_all(&alpha_style, 0);                                       /* 设置样式内部填充 */
    lv_obj_add_style(alpha_cont, &alpha_style, 0);                               /* 给对象添加样式 */

    /* 键盘背景 */
    back_cont = lv_obj_create(alpha_cont);                                       /* 创建基础对象 */
    lv_obj_set_size(back_cont, lv_pct(85), lv_pct(100));                         /* 设置大小 */
//    lv_obj_add_style(back_cont, &style_parentObj, LV_STATE_DEFAULT);
    lv_obj_align(back_cont, LV_ALIGN_CENTER, 0, 0);                              /* 设置位置 */
    lv_obj_set_style_bg_color(back_cont, lv_color_hex(0xf3f3f3), 0);             /* 设置背景颜色 */
    lv_obj_set_style_border_width(back_cont, 0, 0);                              /* 去除边框 */
    lv_obj_set_style_radius(back_cont, 20, 0);                                   /* 设置圆角 */
    lv_obj_remove_style(back_cont, NULL, LV_PART_SCROLLBAR);                     /* 移除滚动条 */

    /* 键盘标题 */
    title_lable = lv_label_create(back_cont);                                    /* 基于背景创建标签 */
    lv_label_set_text(title_lable, LV_SYMBOL_KEYBOARD" CHAR:");  /* 设置格式化文本 */                                      /* 设置文本 */
    lv_obj_set_style_text_align(title_lable, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN);/* 设置文本居中 */
    lv_obj_set_height(title_lable, lv_pct(10));
    lv_obj_set_style_text_font(title_lable,&lv_font_montserrat_20,LV_STATE_DEFAULT);
    lv_obj_align (title_lable,LV_ALIGN_TOP_LEFT, 0, 0);                          /* 设置位置 */

    /* 输入框 */
    input_textarea = lv_textarea_create(back_cont);                              /* 创建输入框 */
    lv_textarea_add_text(input_textarea, "");                                    /* 设置文本 */
    lv_obj_set_size(input_textarea, lv_pct(100), lv_pct(5));                                    /* 设置对象大小 */
    lv_textarea_set_max_length(input_textarea, 20);                              /* 设置输入字符长度为 20 */
    lv_textarea_set_accepted_chars(input_textarea, \
    		"0123456789qwertyuiopasdfghjklzxcvbnm+&/*=%!?#<>\\@$(){}[];'_-.,:\""
    		"QWERTYUIOPASDFGHJKLZXCVBNM");              /* 设置接收输入字符列表 */
    lv_textarea_set_one_line(input_textarea, true);                              /* 一行模式 */
    lv_obj_center(input_textarea);                                               /* 中间对齐 */
    lv_obj_set_style_text_font(input_textarea,&lv_font_montserrat_20,LV_STATE_DEFAULT);
    lv_obj_align(input_textarea, LV_ALIGN_TOP_MID, 0, lv_pct(10));                       /* 设置位置 *//* 设置位置 */

    /* 定义并创建键盘 */
    charBtn = lv_keyboard_create(back_cont);
    /* 为键盘指定一个文本区域 */
    lv_keyboard_set_textarea(charBtn, input_textarea);                            // 显示键盘
    lv_obj_set_size(charBtn, lv_pct(100), lv_pct(75));                            /* 设置大小 */
    lv_obj_set_style_bg_color(charBtn, lv_color_hex(0xf3f3f3), LV_PART_MAIN);    /* 设置背景颜色 */
    lv_obj_set_style_bg_color(charBtn, lv_color_white(), \
    		LV_PART_ITEMS | LV_STATE_DEFAULT);                                   /* 设置按键颜色 */
    lv_obj_align(charBtn, LV_ALIGN_TOP_MID, 0, lv_pct(25));     /* 设置位置 */
    lv_obj_set_style_pad_left(charBtn, 0, LV_STATE_DEFAULT);
    lv_obj_set_style_pad_right(charBtn, 0, LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(charBtn,0, LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(charBtn, &lv_font_montserrat_20, LV_STATE_DEFAULT);
    lv_obj_add_event_cb(charBtn, btnm_event_cb, LV_EVENT_CLICKED, result);  /* 添加按键点击回调 */
    lv_obj_add_event_cb(alpha_cont, cont_event_cb, LV_EVENT_CLICKED, NULL);		  /* 透明背景点击回调 */

}
/**
  * @brief	创建数字键盘
  * @param  minVal   键盘传入最小值  maxVal   键盘输入最大值
  *         result   用于返回用户的数值
  * @retval None
  */
void keyboard_create_float(int minVal, int maxVal, kb_userData_t * result)
{
	if(result == NULL)  //整数
	{
		CA.sumReg = 1;
	}
	else  //浮点数
	{
		CA.sumReg = 2;
	}

	/* 范围限制 */
	min_val = minVal;
	max_val = maxVal;
    /* 创建全屏透明容器 */
	alpha_cont = lv_obj_create(lv_scr_act());                                    /* 基于屏幕创建了一个容器 */
    lv_obj_add_style(alpha_cont, &style_parentObj, LV_STATE_DEFAULT);				 /* 无边框 */
    lv_obj_set_size(alpha_cont, lv_pct(100), lv_pct(87));  						 /* 设置父对象的大小 */
    lv_obj_set_style_bg_color(alpha_cont,lv_palette_main(LV_PALETTE_GREEN), \
    		LV_STATE_DEFAULT);													 /* 设置背景颜色 */
    lv_obj_align(alpha_cont, LV_ALIGN_BOTTOM_LEFT, 0, 0); 						 /*设置父对象的位置 */

    /* 定义透明容器风格 */
    lv_style_init(&alpha_style);                                                 /* 初始化样式 */
    lv_style_set_radius(&alpha_style, 0);                                        /* 设置样式的圆角弧度*/
    lv_style_set_border_width(&alpha_style, 0);                                  /* 设置边框宽度 */
    lv_style_set_bg_opa(&alpha_style, LV_OPA_TRANSP);                            /* 设置样式背景的透明度，透明 */
    lv_style_set_pad_all(&alpha_style, 0);                                       /* 设置样式内部填充 */
    lv_obj_add_style(alpha_cont, &alpha_style, 0);                               /* 给对象添加样式 */

    /* 键盘背景 */
    back_cont = lv_obj_create(alpha_cont);                                       /* 创建基础对象 */
    lv_obj_set_size(back_cont, lv_pct(60), lv_pct(100));                         /* 设置大小 */
    lv_obj_align(back_cont, LV_ALIGN_CENTER, 0, 0);                              /* 设置位置 */
    lv_obj_set_style_bg_color(back_cont, lv_color_hex(0xf3f3f3), 0);             /* 设置背景颜色 */
//  lv_obj_set_style_bg_opa(back_cont, 150, 0);                                  /* 设置透明度 */
    lv_obj_set_style_border_width(back_cont, 0, 0);                              /* 去除边框 */
    lv_obj_set_style_radius(back_cont, 20, 0);                                   /* 设置圆角 */
    lv_obj_remove_style(back_cont, NULL, LV_PART_SCROLLBAR);                     /* 移除滚动条 */

    /* 键盘标题 */
    title_lable = lv_label_create(back_cont);                                    /* 基于背景创建标签 */
    lv_label_set_text_fmt(title_lable, LV_SYMBOL_KEYBOARD" NUM:       Min: %5d           Max: %5d", minVal, maxVal);  /* 设置格式化文本 */                                      /* 设置文本 */
    lv_obj_set_style_text_align(title_lable, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN);/* 设置文本居中 */
    lv_obj_set_height(title_lable, lv_pct(10));
    lv_obj_set_style_text_font(title_lable,&lv_font_montserrat_20,LV_STATE_DEFAULT);
    lv_obj_align (title_lable,LV_ALIGN_TOP_LEFT, 0, 0);                          /* 设置位置 */

    /* 输入框 */
    input_textarea = lv_textarea_create(back_cont);                              /* 创建输入框 */
    lv_textarea_add_text(input_textarea, "");                                    /* 设置文本 */
    lv_obj_set_size(input_textarea, lv_pct(100), lv_pct(5));                                    /* 设置对象大小 */
    lv_textarea_set_max_length(input_textarea, 20);                              /* 设置输入字符长度为 20 */
    lv_textarea_set_accepted_chars(input_textarea, "0123456789.-");              /* 设置接收输入字符列表 */
    lv_textarea_set_one_line(input_textarea, true);                              /* 一行模式 */
    lv_textarea_set_cursor_click_pos(input_textarea, false);                     /* 禁用光标 */
    lv_obj_center(input_textarea);                                               /* 中间对齐 */
    lv_obj_set_style_text_font(input_textarea,&lv_font_montserrat_20,LV_STATE_DEFAULT);
    lv_obj_align(input_textarea, LV_ALIGN_TOP_MID, 0, lv_pct(10));                       /* 设置位置 */

    /* 按钮矩阵（创建） */
    num_btn = lv_btnmatrix_create(back_cont);                                    /* 创建按钮矩阵 */
    lv_obj_set_size(num_btn, lv_pct(100), lv_pct(75));                           /* 设置大小 */
//    lv_obj_add_style(parentObj, &style_parentObj, LV_STATE_DEFAULT);
    lv_btnmatrix_set_map(num_btn, num_map);                                      /* 设置按钮 */
    lv_obj_set_style_bg_color(num_btn, lv_color_hex(0xf3f3f3), LV_PART_MAIN);    /* 设置背景颜色 */
    lv_obj_set_style_bg_color(num_btn, lv_color_white(), \
    		LV_PART_ITEMS | LV_STATE_DEFAULT);                                   /* 设置按键颜色 */
    lv_obj_align(num_btn, LV_ALIGN_OUT_TOP_MID, 0, lv_pct(25));    /* 设置位置 */
    lv_obj_add_event_cb(num_btn, btnm_event_cb, LV_EVENT_CLICKED, result); /* 添加按键点击回调 */
    lv_obj_set_style_text_font(num_btn,&lv_font_montserrat_20,LV_STATE_DEFAULT);
    lv_obj_add_event_cb(alpha_cont, cont_event_cb, LV_EVENT_CLICKED, NULL);		 /* 透明背景点击回调 */

}
void keyboard_create_int(int minVal, int maxVal, kb_userData_t * result)
{
	g_intResult = (uint16_t*)result->value;
	keyboard_create_float(minVal, maxVal, NULL);
	lv_btnmatrix_set_btn_ctrl(num_btn, 14, LV_BTNMATRIX_CTRL_DISABLED);
}

/**
  * @brief  登录密码输入框回调
  * @param  无
  * @retval 无
  */
void UI_login_event_cb(lv_event_t *e)
{
	static kb_userData_t login;
	lv_event_code_t code = lv_event_get_code(e); /* 获取事件类型 */
	lv_obj_t *target = lv_event_get_target(e); /* 获取触发源 */
	login.value = &loginInfo.loginPassword[0];
	if(code == LV_EVENT_CLICKED)
	{
		if(target == loginPasswordTextarea)  //登录密码输入框
		{
			keyboard_create_char(&login);//创建输入键盘
		}
		else if(target == loginConfBtn)  //登录确认按钮
		{
			/* 根据登录账户判断密码是否正确 */
			switch(loginInfo.loginUser)
			{
			case ADMIN:
				if(strcmp(&loginInfo.loginPassword[0], ADMINPASSWORD) == 0)  //密码正确
				{
					disp.Login = DIF_FAC;  //准备进入工厂参数界面
				}
				else  //密码错误
				{
					disp.Login = DIF_NULL;  //无显示界面
				}
				break;
			case PCB:  //预留
	//			if(strcmp(&loginInfo.loginPassword[0], PCBPASSWORD) == 0)  //密码正确
	//			{
	//
	//			}
	//			else  //密码错误
	//			{
	//				disp.Login = DIF_NULL;  //无显示界面
	//			}
				break;
			case USER:
				if(strcmp(&loginInfo.loginPassword[0], USERPASSWORD) == 0)  //密码正确
				{
					disp.Login = DIF_PRO;  //准备进入高级设置界面
				}
				else  //密码错误
				{
					disp.Login = DIF_NULL;  //无显示界面
				}
				break;
			case NONE:  //没有用户
				break;
			}

			/* 根据密码是否正确进行相应操作 */
			if(disp.Login != DIF_NULL)  //密码正确
			{
				disp.New = disp.Login;  //进入需要登录的界面
				login_delete();  //删除登录界面
			}
			else  //密码错误
			{
				passwordError_create();  //创建密码错误界面
			}
		}
		else if(target == loginCancelBtn)  //登录取消按钮
		{
			login_delete();  //删除登录界面
		}
	}
}

/**
  * @brief  登录窗口创建
  * @param  无
  * @retval 无
  */
void login_create(void)
{
	lv_obj_t* label = NULL;  //显示标签

	/* 登录窗口父对象 */
	loginObj = lv_obj_create(parentObj);  //创建父对象
    lv_obj_add_style(loginObj, &style_parentObj1, LV_STATE_DEFAULT);  //添加父对象为无填充样式
    lv_obj_set_size(loginObj, lv_pct(88), lv_pct(83));  //设置父对象的大小
    lv_obj_set_style_align(loginObj, LV_ALIGN_CENTER, LV_STATE_DEFAULT); //设置父对象的位置

	/* 提示文本 */
	label = lv_label_create(loginObj);
	lv_label_set_text(label, dispText[DA.typeLanguage].loginText);
	lv_obj_align(label, LV_ALIGN_TOP_MID, 0, 0);

	/* 提示文本 */
	label = lv_label_create(loginObj);
	lv_label_set_text(label, dispText[DA.typeLanguage].code);
	lv_obj_align(label, LV_ALIGN_TOP_LEFT, lv_pct(5), lv_pct(32));

    /* 登录密码输入框 */
	loginPasswordTextarea = lv_textarea_create(loginObj);  //登录密码输入框
    lv_textarea_set_placeholder_text(loginPasswordTextarea, dispText[DA.typeLanguage].password);  //提示
    lv_obj_set_size(loginPasswordTextarea, lv_pct(60), lv_pct(10));  //大小
    lv_textarea_set_max_length(loginPasswordTextarea, 4);  //字符最大长度
    lv_textarea_set_accepted_chars(loginPasswordTextarea, \
    		"0123456789qwertyuiopasdfghjklzxcvbnm+&/*=%!?#<>\\@$(){}[];'_-.,:\""
    		"QWERTYUIOPASDFGHJKLZXCVBNM");              /* 设置接收输入字符列表 */
    lv_textarea_set_one_line(loginPasswordTextarea, true);  //单行模式
//    lv_textarea_set_password_mode(loginPasswordTextarea, true);  //密码模式
    lv_textarea_set_cursor_click_pos(loginPasswordTextarea, true);  //使用光标
    lv_obj_align(loginPasswordTextarea, LV_ALIGN_TOP_LEFT, lv_pct(20), lv_pct(30));
    lv_obj_add_event_cb(loginPasswordTextarea, UI_login_event_cb,  LV_EVENT_CLICKED, NULL);  //添加事件

    /* 登录确认按钮 */
    loginConfBtn = lv_btn_create(loginObj);  //创建登录确认按钮
    lv_obj_align_to(loginConfBtn, loginObj, LV_ALIGN_TOP_LEFT, lv_pct(20), lv_pct(70));  //位置
    lv_obj_add_event_cb(loginConfBtn, UI_login_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 登录确认按钮标签 */
    label = lv_label_create(loginConfBtn);  //创建登录确认按钮标签
    lv_obj_align_to(label, loginConfBtn, LV_ALIGN_TOP_LEFT, 0, 0);  //位置
    lv_obj_set_style_text_color(label,lv_color_hex(0xFFFFFF),LV_STATE_DEFAULT);  //颜色
    lv_label_set_text(label, dispText[DA.typeLanguage].confirm);  //文本内容
    lv_label_set_recolor(label, true);  //启用标签文本重新着色

    /* 登录取消按钮 */
    loginCancelBtn = lv_btn_create(loginObj);  //创建登录取消按钮
    lv_obj_align_to(loginCancelBtn, loginObj, LV_ALIGN_TOP_LEFT, lv_pct(60), lv_pct(70));  //位置
    lv_obj_set_style_bg_color(loginCancelBtn, lv_color_hex(0x202020), LV_STATE_DEFAULT); //设置对象背景颜色
    lv_obj_add_event_cb(loginCancelBtn, UI_login_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 登录取消按钮标签 */
    label = lv_label_create(loginCancelBtn);  //创建登录取消按钮标签
    lv_obj_align_to(label, loginCancelBtn, LV_ALIGN_TOP_LEFT, 0, 0);  //位置
    lv_obj_set_style_text_color(label,lv_color_hex(0xFFFFFF),LV_STATE_DEFAULT);  //颜色
    lv_label_set_text(label, dispText[DA.typeLanguage].cancel);  //文本内容
    lv_label_set_recolor(label, true);  //启用标签文本重新着色
}

/**
  * @brief  登录窗口删除
  * @param  无
  * @retval 无
  */
void login_delete(void)
{
	loginInfo.loginUser = NONE;
	memset(loginInfo.loginPassword, 0, sizeof(loginInfo.loginPassword));  //清空密码
	disp.Login = DIF_NULL;  //无显示界面
	lv_obj_del(loginObj);  //删除当前界面
}

/**
  * @brief  密码错误按键回调
  * @param  无
  * @retval 无
  */
void UI_passwordError_event_cb(lv_event_t *e)
{
	lv_event_code_t code = lv_event_get_code(e); /* 获取事件类型 */
	lv_obj_t *target = lv_event_get_target(e); /* 获取触发源 */

	if(code == LV_EVENT_CLICKED)
	{
		if(target == passwordErrorConfBtn)
		{
			passwordError_delete();  //删除密码错误窗口
		}
	}
}

/**
  * @brief  密码错误窗口创建
  * @param  无
  * @retval 无
  */
void passwordError_create(void)
{
	lv_obj_t* label = NULL;  //显示标签

	/* 密码错误窗口父对象 */
	passwordErrorObj = lv_obj_create(loginObj);  //创建父对象
    lv_obj_add_style(passwordErrorObj, &style_parentObj1, LV_STATE_DEFAULT);  //添加父对象为无填充样式
    lv_obj_set_size(passwordErrorObj, lv_pct(60), lv_pct(80));  //设置父对象的大小
    lv_obj_set_style_align(passwordErrorObj, LV_ALIGN_CENTER, LV_STATE_DEFAULT); //设置父对象的位置

	/* 提示文本 */
	label = lv_label_create(passwordErrorObj);
	lv_label_set_text(label, dispText[DA.typeLanguage].passwordErrorText);
	lv_obj_align(label, LV_ALIGN_TOP_MID, 0, lv_pct(20));

    /* 密码错误确认按钮 */
	passwordErrorConfBtn = lv_btn_create(passwordErrorObj);  //创建登录确认按钮
	lv_obj_align(passwordErrorConfBtn, LV_ALIGN_TOP_MID, 0, lv_pct(60));
    lv_obj_add_event_cb(passwordErrorConfBtn, UI_passwordError_event_cb, LV_EVENT_CLICKED, NULL);  //事件
    /* 密码错误确认按钮标签 */
    label = lv_label_create(passwordErrorConfBtn);  //创建登录确认按钮标签
    lv_obj_align_to(label, passwordErrorConfBtn, LV_ALIGN_TOP_LEFT, 0, 0);  //位置
    lv_obj_set_style_text_color(label,lv_color_hex(0xFFFFFF),LV_STATE_DEFAULT);  //颜色
    lv_label_set_text(label, dispText[DA.typeLanguage].confirm);  //文本内容
    lv_label_set_recolor(label, true);  //启用标签文本重新着色
}

/**
  * @brief  密码错误窗口删除
  * @param  无
  * @retval 无
  */
void passwordError_delete(void)
{
	memset(loginInfo.loginPassword, 0, sizeof(loginInfo.loginPassword));  //清空密码
	if(lv_obj_is_valid(loginPasswordTextarea) == true)  //登录密码输入框存在
	{
		lv_textarea_set_text(loginPasswordTextarea, &loginInfo.loginPassword[0]);  //将变量数值给密码输入输入框
	}
	lv_obj_del(passwordErrorObj);  //删除当前界面
}

/**
  * @brief  输入框显示整数刷新
  * @param  无
  * @retval 无
  */
void textarea_refresh_int(lv_obj_t * obj, int result)
{
	char str[12];
	sprintf(str, "%d", result);     // %u是无符号整数的格式化输出
    lv_textarea_set_text(obj, str);
}
/**
  * @brief	判断类型是否为浮点数
  * @param  *type 类型描述字符串
  * @retval 0:不为浮点数 1:为浮点数 2:字符串
  */
uint8_t type_is_float(char* type)
{
	for(uint8_t i = 0; i < strlen(type); i++)
	{
		if((type[i] == 'f')||(type[i] == 'F'))
		{
			return 1;
		}
		else if((type[i] == 's')||(type[i] == 'S'))
		{
			return 2;
		}
	}
	return 0;
}
/**
  * @brief	文本框按下回调函数
  * @param  None
  * @retval None
  */
void textarea_clicked_cb(lv_event_t * e)
{
	lv_event_code_t code = lv_event_get_code(e);
	lv_obj_t* obj = (lv_obj_t*)lv_event_get_target(e);
	ta_userData_t userData = *(ta_userData_t *)lv_obj_get_user_data(obj);
	if(code == LV_EVENT_CLICKED)
	{
		if(type_is_float(userData.type) == 1)  //浮点数
		{
			keyboard_create_float(userData.data.min, userData.data.max, (kb_userData_t*)e->user_data);
		}
		else if(type_is_float(userData.type) == 2)  //字符串
		{
			keyboard_create_char((kb_userData_t*)e->user_data);
		}
		else  //整数
		{
			keyboard_create_int(userData.data.min, userData.data.max, (kb_userData_t*)e->user_data);
		}
	}
}
/**
  * @brief	文本框创建函数
  * @param  None
  * @retval None
  */
void textarea_create_by(lv_obj_t* cont, ta_userData_t* ta)
{
	char str[50];
	lv_obj_t* textarea = NULL;
	textarea = lv_textarea_create(cont);
	if(type_is_float(ta->type) == 1)
		sprintf(str, ta->type, *(float*)ta->data.userData.value);
	else if(type_is_float(ta->type) == 2)
		strcpy(&str[0], (char*)ta->data.userData.value);
	else
		sprintf(str, ta->type, *(uint16_t*)ta->data.userData.value);
	lv_textarea_set_text(textarea, str);
	lv_obj_set_size(textarea, ta->width, ta->height);
	lv_textarea_set_max_length(textarea, ta->max_length);
	lv_textarea_set_accepted_chars(textarea, ta->accepted_chars);
	lv_textarea_set_one_line(textarea, ta->one_line);
	lv_textarea_set_cursor_click_pos(textarea, ta->cursor_click_pos);
	lv_obj_align(textarea, LV_ALIGN_TOP_LEFT, ta->pos_x, ta->pos_y);
	lv_obj_set_user_data(textarea, ta);
	lv_obj_add_event_cb(textarea, textarea_clicked_cb, LV_EVENT_CLICKED, &ta->data.userData);
}
/**
  * @brief  发送辅助函数
  * @param  无
  * @retval 无
  */
void send_aux(void* valve)
{
	CA.flagWrite = 1;

	userAdde = (uintptr_t)valve;

	if((userAdde >= upStart) && (userAdde <= upEnd))  //用户参数
	{
		CA.commAddr = ((userAdde - upStart) / 2) + 99;
	}
	else if((userAdde >= fpStart) && (userAdde <= fpEnd))  //工厂参数
	{
		CA.commAddr = ((userAdde - fpStart) / 2) + 999;
	}

	CA.sumReg = 1;
	CA.ramAddr = (uint16_t*)valve;
}
/**
  * @brief  程序控温发送辅助函数(UP.gProgram_SP、UP.gProgram_Time_ThisStep)
  * @param  无
  * @retval 无
  */
void ctrl_temp_send_aux(void* valve)
{
	CA.flagWrite = 1;

	userAdde = (uintptr_t)valve;

	if((userAdde >= upStart) && (userAdde <= upEnd))  //用户参数
	{
		CA.commAddr = ((userAdde - upStart) / 2) + 100;
	}

	CA.sumReg = 3;
	CA.ramAddr = (uint16_t*)valve;
}
/**
  * @brief  发送屏幕的稳定温度和稳定时间到主板
  * @param  无
  * @retval 无
  */
void programCtrlTemp_refresh(void)
{
	static uint8_t step = 0;
	if (program_lastStep != UP.gProgram_Step)
	{
		if (UP.ES_ProTempCtrl == 1)
		{
			if (step == 0)
			{
				step++;
				UP.gProgram_Time_ThisStep = DA.taUser_table[UP.gProgram_Step].program_Time_ThisStep;

				send_aux(&UP.gProgram_Time_ThisStep);
			}
			else if (step == 1 && CA.flagWrite == 0)
			{
				step = 0;
				program_lastStep = UP.gProgram_Step;
				UP.gProgram_SP = DA.taUser_table[UP.gProgram_Step].program_SP;
				CA.flagWrite = 1;
				CA.sumReg = 2;
				CA.ramAddr = (uint16_t*)&UP.gProgram_SP;
				CA.commAddr = (((uintptr_t)&UP.gProgram_SP - upStart) / 2) + 99;
			}

		}
	}
}
/**
  * @brief  初始化图片素材
  * @param  无
  * @retval 无
  */
void init_img(void)
{
	/* 初始化背景图片 */
	for (uint8_t i = 0; i < 3; i++)
	{
		dsc_img_buff[i].header.cf = LV_IMG_CF_TRUE_COLOR;
		dsc_img_buff[i].header.always_zero = 0;
		dsc_img_buff[i].header.reserved = 0,
		dsc_img_buff[i].header.w = 800,
		dsc_img_buff[i].header.h = 480,
		dsc_img_buff[i].data_size = 384000 * LV_COLOR_SIZE / 8,
		dsc_img_buff[i].data = g_imgBuff[i] + 4;
	}
	dsc_img_buff[3].header.cf = LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED;
	dsc_img_buff[3].header.always_zero = 0;
	dsc_img_buff[3].header.reserved = 0,
	dsc_img_buff[3].header.w = 584;
	dsc_img_buff[3].header.h = 322;
	dsc_img_buff[3].data_size = 188048 * LV_COLOR_SIZE / 8;
	dsc_img_buff[3].data = g_imgBuff[3] + 4;

	dsc_img_buff[4].header.cf = LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED;
	dsc_img_buff[4].header.always_zero = 0;
	dsc_img_buff[4].header.reserved = 0,
	dsc_img_buff[4].header.w = 722,
	dsc_img_buff[4].header.h = 300,
	dsc_img_buff[4].data_size = 216600 * LV_COLOR_SIZE / 8,
	dsc_img_buff[4].data = g_imgBuff[4] +  4;
	/* 初始化所有图标 */

	for (uint8_t i = 0; i < 16; i++)
	{
		dsc_ico_buff[i].header.cf = LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED;
		dsc_ico_buff[i].header.always_zero = 0;
		dsc_ico_buff[i].header.reserved = 0;
		dsc_ico_buff[i].data = g_icoBuff[i] + 4;
	}
	dsc_ico_buff[0].header.w = 51;
	dsc_ico_buff[0].header.h = 35;
	dsc_ico_buff[0].data_size = 1785 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[1].header.w = 46;
	dsc_ico_buff[1].header.h = 27;
	dsc_ico_buff[1].data_size = 1242 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[2].header.w = 202;
	dsc_ico_buff[2].header.h = 89;
	dsc_ico_buff[2].data_size = 17978 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[3].header.w = 202;
	dsc_ico_buff[3].header.h = 89;
	dsc_ico_buff[3].data_size = 17978 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[4].header.w = 34;
	dsc_ico_buff[4].header.h = 35;
	dsc_ico_buff[4].data_size = 1190 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[5].header.w = 126;
	dsc_ico_buff[5].header.h = 37;
	dsc_ico_buff[5].data_size = 4662 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[6].header.w = 126;
	dsc_ico_buff[6].header.h = 34;
	dsc_ico_buff[6].data_size = 4284 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[7].header.w = 123;
	dsc_ico_buff[7].header.h = 183;
	dsc_ico_buff[7].data_size = 22509 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[8].header.w = 123;
	dsc_ico_buff[8].header.h = 183;
	dsc_ico_buff[8].data_size = 22509 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[9].header.w = 132;
	dsc_ico_buff[9].header.h = 58;
	dsc_ico_buff[9].data_size = 7656 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[10].header.w = 132;
	dsc_ico_buff[10].header.h = 58;
	dsc_ico_buff[10].data_size = 7656 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[11].header.w = 66;
	dsc_ico_buff[11].header.h = 63;
	dsc_ico_buff[11].data_size = 4158 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[12].header.w = 110;
	dsc_ico_buff[12].header.h = 115;
	dsc_ico_buff[12].data_size = 12650 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[13].header.w = 81;
	dsc_ico_buff[13].header.h = 81;
	dsc_ico_buff[13].data_size = 6561 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[14].header.w = 174;
	dsc_ico_buff[14].header.h = 224;
	dsc_ico_buff[14].data_size = 38976 * LV_COLOR_SIZE / 8;
	dsc_ico_buff[15].header.w = 113;
	dsc_ico_buff[15].header.h = 79;
	dsc_ico_buff[15].data_size = 8927 * LV_COLOR_SIZE / 8;
}
